eef98c23faa640eceeaafaa4fe6bfeb6ce650274,examples/src/main/java/org/apache/ignite/examples/datagrid/starschema/CacheStarSchemaExample.java,CacheStarSchemaExample,queryStorePurchases,#,150

Before Change


        // ========================

        // Create cross cache query to get all purchases made at store1.
        CacheQuery<Map.Entry<Integer, FactPurchase>> storePurchases = factCache.queries().createSqlQuery(
            FactPurchase.class,
            "from \"replicated\".DimStore, \"partitioned\".FactPurchase " +
                "where DimStore.id=FactPurchase.storeId and DimStore.name=?");

        printQueryResults("All purchases made at store1:",
            storePurchases.execute("Store1").get());
    }

    /**

After Change


        // ========================

        // Create cross cache query to get all purchases made at store1.
        QueryCursor<Cache.Entry<Integer, FactPurchase>> storePurchases = factCache.query(sql(
            FactPurchase.class,
            "from \"replicated\".DimStore, \"partitioned\".FactPurchase "
                + "where DimStore.id=FactPurchase.storeId and DimStore.name=?").setArgs("Store1"));

        printQueryResults("All purchases made at store1:", storePurchases.getAll());
    }

    /**